package com.app.bimo.module_accounts.mvp.constract;


import com.app.bimo.commonbusiness.bean.BaseResult;
import com.app.bimo.commonbusiness.mvp.IModel;
import com.app.bimo.commonbusiness.mvp.IView;
import com.app.bimo.library_db.UserData;
import com.app.bimo.module_accounts.mvp.model.entiy.PreferenceData;

import java.util.List;

import io.reactivex.Observable;

public class PreferenceContract {
    //对于经常使用的关于UI的方法可以定义到IView中,如显示隐藏进度条,和显示文字消息
    public interface View extends IView {
        void getPreDataNotify(List<PreferenceData> list);

        void setPreDataNotify();
        void showDialogLoading();

        void hideDialogLoading();
//        void userInfoNotify(UserData data);

    }

    //Model层定义接口,外部只需关心Model返回的数据,无需关心内部细节,如是否使用缓存
    public interface Model extends IModel {
        Observable<BaseResult<List<PreferenceData>>> getPre(int channel);

//        Observable<BaseResult<Object>> setPre(int channel, String categoryids);
        Observable<BaseResult<Object>> setPre(int channel, String categoryids, int isRegiest);
        Observable<BaseResult<UserData>> getUserInfo();
    }
}
